chore: add TBP failures to postgres channel #36630
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces modifications to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
|
||
| # This is the ChannelId of the pro-postgres-sync channel. | ||
| body="$(jq -nc \ | ||
| --arg channel C07JMLWEXDJ \ | ||
| --arg text "$slack_message" \ | ||
| '$ARGS.named' | ||
| )" | ||
| curl --version | ||
| curl -v https://slack.com/api/chat.postMessage \ | ||
| --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ | ||
| --header 'Content-Type: application/json; charset=utf-8' \ | ||
| --data-raw "$body" |
There was a problem hiding this comment.
Class, let's examine this new addition to our workflow!
Now, pay attention to how we've expanded our communication strategy. We're not just notifying one channel anymore, but two! This is like sending a note home to both your parents and your grandparents.
Let's break it down:
- We're using a new channel ID for the "pro-postgres-sync" channel.
- We're crafting the message body just like before, very consistent!
- We're using
curlagain to send the message, just like a carrier pigeon but faster!
However, there's room for improvement:
- The
curl --versioncommand on line 509 seems unnecessary. It's like checking if your pencil works before writing - usually not needed! - We're missing the
--fail-with-bodyoption in this newcurlcommand. Remember, it's always good to know why something didn't work!
Let's make these small adjustments:
- curl --version
curl -v https://slack.com/api/chat.postMessage \
+ --fail-with-body \
--header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw "$body"Can anyone tell me why these changes will make our code better?
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # This is the ChannelId of the pro-postgres-sync channel. | |
| body="$(jq -nc \ | |
| --arg channel C07JMLWEXDJ \ | |
| --arg text "$slack_message" \ | |
| '$ARGS.named' | |
| )" | |
| curl --version | |
| curl -v https://slack.com/api/chat.postMessage \ | |
| --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ | |
| --header 'Content-Type: application/json; charset=utf-8' \ | |
| --data-raw "$body" | |
| # This is the ChannelId of the pro-postgres-sync channel. | |
| body="$(jq -nc \ | |
| --arg channel C07JMLWEXDJ \ | |
| --arg text "$slack_message" \ | |
| '$ARGS.named' | |
| )" | |
| curl -v https://slack.com/api/chat.postMessage \ | |
| --fail-with-body \ | |
| --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ | |
| --header 'Content-Type: application/json; charset=utf-8' \ | |
| --data-raw "$body" |
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Description
Notify the DB Infra team for any failures in TBP workflow for the Postgres failures. This is keep the PG stable and tackle the Cypres/JUnit failures when the changes are merged from release branch.
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Warning
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11174148513
Commit: 46166d8
Cypress dashboard.
Tags: @tag.Sanity
Spec:
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.
Fri, 04 Oct 2024 04:50:44 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
masterandpgbranches.Chores